<%--
  Created by IntelliJ IDEA.
  User: xf
  Date: 2016/5/7
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Stomp</title>
    <script src="http://cdn.sockjs.org/sockjs-0.3.min.js"></script>
    <script src="http://cdn.bootcss.com/stomp.js/2.3.3/stomp.js"></script>
    <script>
        $(function () {
            var url = 'http://' + window.location.host + '/marcopolo';
            var sock = new SockJS(url);
            var stomp = Stomp.over(sock);
            var payload = JSON.stringify({'message': 'Marco!'});
            stomp.connect('guest', 'guest', function (frame) {
                stomp.send("/app/marco", {}, payload);
            })
        })
    </script>
</head>
<body>

</body>
</html>
